<?php
include( "gConfig.php" );
/*
$tSno = $_POST['tSno'];
$tState = $_POST['tState'];
$tDate = $_POST['tDate'];
$tName = $_POST['tName'];
$tName1 = $_POST['tName1'];
$tName2 = $_POST['tName2'];
$tName3 = $_POST['tName3'];
$tName4 = $_POST['tName4'];
$tScore = $_POST['tScore'];
$tRoom = $_POST['tRoom'];
$tRound = $_POST['tRound'];
$tResult = $_POST['tResult'];
$tWin = $_POST['tWin'];
$tWater = $_POST['tWater'];
$tRang = $_POST['tRang'];
$tBet = $_POST['tBet'];
$tBetWin = $_POST['tBetWin'];
$tBets = $_POST['tBets'];

$type = $_POST['type'];
*/

$uid = $_GET['uid'];
if ( $uid == "" )
{
    exit( );
}
checkuid($uid,5);

$room = $_GET['room'];
$Round = $_GET['sRound'];
$query = "select tWin,tScore,tWater,tResult,tBets from b_tran where tName='{$MyData['Name']}' and tRound = $Round and tRoom = $room ";
$result = mysql_query($query,$comm);
$row = mysql_fetch_row($result);
$water = explode(",", $row[2]);
$mark = $row[3]&3;
$bets = explode(",", $row[4]);
$lost = 0;
if($mark==1){
	$lost = intval($bets[0]);
}
if($mark==2){
	$lost = intval($bets[1]);
}
$lost = $lost * $water[4];

$query = "select gRang1,gUse from b_group where gName='{$MyData['Name']}'";
$result = mysql_query($query,$comm);
$newwater = mysql_fetch_row($result);
$rang = $newwater[0]/10;

echo "{";
echo "
\"tWin\":\"{$row[0]}\",
\"tScore\":\"{$row[1]}\",
\"tWater\":\"{$rang}\",
\"gUse\":\"{$newwater[1]}\"
";
echo "}";
?>